const mongoose =require("mongoose")
const schema = mongoose.Schema;
mongoose.connect("mongodb://127.0.0.1:27017/",{
    useNewUrlParser: true,
    useUnifiedTopology: true
}).then(()=>{
    console.log("连接成功")
}).catch((err)=>{
    throw err;
})


let userSchema = new schema({
    username:{
        required:true,
        type:String
    },
    password:{
        required:true,
        type:String
    }
})

let userpas = mongoose.model("userpas",userSchema)

module.exports ={
    userpas
}